<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="@{include} :: header"></head>

<style>
    .layui-form-item{
        margin-bottom: 8px;
    }
</style>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-row">
            <form class="layui-form layui-form-pane" id="signupForm">
                <input id="id" name="id" th:value="${citizen.id}" type="hidden">
                <div class="layui-form-item">
                    <label class="layui-form-label">乡镇名称</label>
                    <div class="layui-input-block">
                        <select name="townId" id="townId" lay-filter="townId" lay-search="">
                            <option value="">所属乡镇</option>
                            <th:block th:each="d : ${towns}">
                                <option th:value="${d.id}" th:text="${d.townName}" th:selected="${citizen.townId eq d.id}"></option>
                            </th:block>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">村居名称</label>
                    <div class="layui-input-block">
                        <select name="villageId" id="villageId" lay-search="">
                            <option value="">所属村居</option>
                            <th:block th:each="d : ${villages}">
                                <option th:value="${d.id}" th:text="${d.townName}" th:selected="${citizen.villageId eq d.id}"></option>
                            </th:block>
                        </select>
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">户主姓名</label>
                    <div class="layui-input-block">
                        <input id="holderName" name="holderName" th:value="${citizen.holderName}" class="layui-input" type="text" />
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">户主电话</label>
                    <div class="layui-input-block">
                        <input id="holderPhone" name="holderPhone" th:value="${citizen.holderPhone}" class="layui-input" type="number" />
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">房屋编号</label>
                    <div class="layui-input-block">
                        <input id="roomNo" name="roomNo" th:value="${citizen.roomNo}" class="layui-input" type="text" />
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">风险等级</label>
                    <div class="layui-input-block">
                        <input id="starLevel" name="starLevel" th:value="${citizen.starLevel}" class="layui-input" type="number" />
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">户类别：</label>
                    <div class="layui-input-block">
                        <select data-placeholder="--请选择--" name="roomType" id="roomType"
                                class="layui-input chosen-select">
                            <option value="">所属户类别</option>
                            <th:block th:each="d : ${room_types}">
                                <option th:value="${d.value}" th:text="${d.name}" th:selected="${citizen.roomType eq d.value}"></option>
                            </th:block>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">取暖方式：</label>
                    <div class="layui-input-block">
                        <select data-placeholder="--请选择--" name="heatingMode" id="heatingMode"
                                class="layui-input chosen-select">
                            <option value="">所属户类别</option>
                            <th:block th:each="d : ${heating_modes}">
                                <option th:value="${d.value}" th:text="${d.name}" th:selected="${citizen.heatingMode eq d.value}"></option>
                            </th:block>
                        </select>
                    </div>
                </div>

<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label">包保人员</label>-->
<!--                    <div class="layui-input-block">-->
<!--                        <input id="managerSysUserId" name="managerSysUserId" th:value="${citizen.managerSysUserId}" class="layui-input" type="text" />-->
<!--                    </div>-->
<!--                </div>-->


                <div class="layui-form-item">
                    <div style="text-align: center;margin-top: 20px">
                        <button onclick="update()" class="layui-btn layui-btn-normal" >提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" th:src="@{/js/appjs/module/citizen/detail.js}"></script>
</body>
</html>
